package org.eden.rpc.service.dao.blog;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;
import org.eden.rpc.common.entity.dao.Tag;

public interface TagMapper {

    @Insert("insert into tag(name) values(#{name})")
    @Options(useGeneratedKeys = true)
    int insertTag(Tag tag);

    @Select("select * from tag where id = #{id}")
    Tag getById(Long id);

}
